From: IOhannes m zmölnig Date: Thu, 7 Apr 2016 20:05:10 +0000 (+0200) Subject: Fixed build with libpng16. X-Git-Tag: archive/raspbian/5.4.5_ds0-1+rpi1~1^2~240 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=f91127471307c221424297f2d863c5aaf52314ee;p=juce.git Fixed build with libpng16. Thanks: Gianfranco Costamagna Closes: 820347 --- diff --git a/debian/patches/fix-build-libpng16.patch b/debian/patches/fix-build-libpng16.patch new file mode 100644 index 00000000..ff9881cc --- /dev/null +++ b/debian/patches/fix-build-libpng16.patch @@ -0,0 +1,29 @@ +Description: Fix build with libpng16 + This patch is inspired with the patch available at https://gist.github.com/balr0g/3004353 +Author: Gianfranco Costamagna + +--- juce-4.1.0+repack.orig/modules/juce_graphics/image_formats/juce_PNGLoader.cpp ++++ juce-4.1.0+repack/modules/juce_graphics/image_formats/juce_PNGLoader.cpp +@@ -320,7 +320,7 @@ namespace PNGHelpers + + static void JUCE_CDECL errorCallback (png_structp p, png_const_charp) + { +- longjmp (*(jmp_buf*) p->error_ptr, 1); ++ setjmp(png_jmpbuf(p)); + } + + static void JUCE_CDECL warningCallback (png_structp, png_const_charp) {} +@@ -442,8 +443,12 @@ namespace PNGHelpers + for (size_t y = 0; y < height; ++y) + rows[y] = (png_bytep) (tempBuffer + lineStride * y); + ++ png_bytep trans_alpha; ++ int num_trans; ++ png_color_16p trans_color; ++ png_get_tRNS(pngReadStruct, pngInfoStruct, &trans_alpha, &num_trans, &trans_color); + if (readImageData (pngReadStruct, pngInfoStruct, errorJumpBuf, rows)) +- return createImageFromData ((colorType & PNG_COLOR_MASK_ALPHA) != 0 || pngInfoStruct->num_trans > 0, ++ return createImageFromData ((colorType & PNG_COLOR_MASK_ALPHA) != 0 || num_trans, + (int) width, (int) height, rows); + } + diff --git a/debian/patches/series b/debian/patches/series index 29ef040f..0764c5bf 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,5 @@ no-ztypes.patch +fix-build-libpng16.patch #MANUAL#introjucer-makegenerator.patch reproducible-date.patch debian_apply-reproducible-date.patch